import axios from '@/libs/api.request.js'

/** 查询图库列表 */
export const selectGalleryList = galleryInfoType =>{
  return axios.request({
    url: "api/gallery/selectGalleryList/"+galleryInfoType,
    method: "get",
  })
}

/** 根据ID查询图库信息 */
export const selectGalleryById = galleryInfoId =>{
  return axios.request({
    url: "api/gallery/selectGalleryById/"+galleryInfoId,
    method: "get",
  })
}

/** 查询案例说明列表 */
export const selectGalleryCaseList = galleryOriginalId =>{
  return axios.request({
    url: "api/gallery/selectGalleryCaseList/"+galleryOriginalId,
    method: "get",
  })
}

/** 查询图库评论列表 */
export const selectGalleryComment = galleryInfoId =>{
  return axios.request({
    url: "api/gallery/selectGalleryComment/"+galleryInfoId,
    method: "get",
  })
}

/** 添加评论信息 */
export const insertGalleryComment = (galleryId,commentText) =>{
  const data = {
    galleryCommentInfo: galleryId,
    galleryCommentText: commentText,
  }
  return axios.request({
    url: "api/gallery/addGalleryComment",
    method: "post",
    data: data,
  })
}
